from flask import Blueprint
from flask_restful import Api
from comment.utils.output import output_json

product_bp = Blueprint('product', __name__, url_prefix='/product')
product_api = Api((product_bp))

# 使用我们自定义json格式，替代装饰器的写法
product_api.representation('application/json')(output_json)


# 加载当前模块的资源
from financial.resources.product.product_resource import InvestProduct, ProductRate

product_api.add_resource(InvestProduct, '/proList', endpoint='proList')
product_api.add_resource(ProductRate, '/proRateList', endpoint='proRateList')
